\(~\)
\(~\)
Polycystic ovarian syndrome (PCOS) is a reproductive hormonal imbalance condition affecting as much as 5 million women in the US alone. It’s believed that genetics and environmental factors can cause PCOS that affect their body physically and emotionally along with their metabolism, overall health and appearance in women. PCOS causes problems in ovaries making it hard for women to have a healthy menstrual cycle leading to the development of cysts and infertility. Although very common in women of reproductive age, PCOS may begin shortly after puberty but can also develop during the later teenage years and early adulthood.
\(~\)
Hormones that are involved in PCOS are:
Androgens: aka “male hormones” are present in women with PCOS at higher levels than usual. Excess in androgens can cause symptoms such as acne, unwanted hair, thinning hair, and irregular periods.
Insulin: allows the body to absorb glucose (blood sugar) into the cells for energy. In PCOS, the body doesn’t respond to insulin as intended therefore, elevations in blood glucose levels can be assessed. Such elevations then lead to increased production of androgen.
Progesterone: vital hormone for menstruation and pregnancy; lack of progesterone contributes to irregular periods.
\(~\)
PCOS Symptoms:
Many of these symptoms can be attributed to other causes or go unnoticed but it is very common for PCOS to go undiagnosed for some time. Here are some symptoms that help with the diagnosis:
Irregular periods: irregular or missed periods as are a result of not ovulating is a common signs of PCOS
Polycystic ovaries: some may develop cysts in their ovaries but some don’t. Ovaries may be enlarged and follicles surrounding their eggs therefore failing to function regularly.
Excess androgen: elevated levels of male hormones can cause excess hair and acne.
\(~\)
Other symptoms may include:
Weight gain: many people with PCOS will have weight gain or obesity that is difficult to manage.
Fatigue: increase in fatigue or low energy is also common
Unwanted hair growth: due to excess androgen, areas such as face, arms, back, chest, hand, toes and abdomen may have excess hair growth.
Thinning hair on the head: hair loss may increase in middle age for those with PCOS
Infertility: PCOS is a leading cause for infertility but not everyone is the same.
Acne: due to hormonal changes, acne can be arise and make skin oilier than usual and cause breakout in the face, chest and upper back.
Darkening of skin: areas such as under arms, breasts or back of your neck may get dark, patchy or thicken
Mood changes: mood swings, depression and anxiety can increase
Pelvic pain: pain may occur with periods along with heavy bleeding or without bleeding
Headaches: can occur due to hormonal changes
Sleep problems: most people often suffer with problem such as insomnia or poor sleep. These arise due to many factors but a common one is having sleep apnea (sleep disorder). Even when you fall asleep you wake up as if you have not slept at all or have trouble falling asleep.
Depression: can arise due to symptoms that can alter your appearance and have a negative impact on your emotions.
It’s good to note that not everyone who is diagnosed with PCOS experiences all of these symptoms and should always consult with a their PCP or OBGYN to get an accurate diagnosis. *
\(~\)
Being diagnosed almost 2 years ago with PCOS I was intrigued to learn more and explore the data that was available. Although not much data was easily accessible this is a start to explore differences or similarities women share with their physical aspect and blood work. It’s also important to be aware of symptoms experienced by PCOS because it’s such symptoms that can always be misinterpreted as “too much stress” or “just lose weight” by doctors. After advocating for myself with multiple doctors over the span of 6 years I saw the true value in listening to your body and sharing my experience with others.
This project will consist of merging two csv files into one but
before attempting to do this my main target are the missing values in
the data set pcos_infertility such as BMI,
FSH.LH and Waist.Hip.Ratio, renaming columns
and ensuring the data sets are manageable. I will then be using the
Shiny App to have interactive visualizations with Plotly to go through
each category and define any patterns women from Indian with PCOS may
have. Essentially we could use these commonalities to help women all
over learn to distinguish symptoms not only by the physical aspects of
PCOS but also during a routine lab work.
\(~\)
These are the libraries used to explore, prepare and visualize the data
library(tidyverse)
library(dplyr)
library(corrplot)
library(DataExplorer)
library(hrbrthemes)
library(ggplot2)
library(rsconnect)
library(plotly)
library(shiny)
\(~\)
Below is a short description of the variables of interest in the data sets:
Things to consider and understand the data set:
\(~\)
I have included the original data sets in my GitHub account and read from this location.
Lets view the pcos data:
… And the pcos_infertility data:
\(~\)
The first data set pcos includes 541 observations and a
total of 6 variables. The second data set pcos_infertility
includes 541 observations and a total of 45 variables. Notice that the
column names are not clear enough for readers, this will be tackled in
the data preparation section.
Rows: 541
Columns: 6
$ Sl..No <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, …
$ Patient.File.No. <int> 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009, 10010, 10011, 10012, 10013, 10014, 10015, 10016, 10017, 10018, 1…
$ PCOS..Y.N. <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ I...beta.HCG.mIU.mL. <dbl> 1.990, 60.800, 494.080, 1.990, 801.450, 237.970, 1.990, 100.510, 1.990, 1.990, 158.510, 1.990, 1214.230, 1.990, 1.990, 1.990, 8…
$ II....beta.HCG.mIU.mL. <dbl> 1.99, 1.99, 494.08, 1.99, 801.45, 1.99, 1.99, 100.51, 1.99, 1.99, 158.51, 1.99, 1214.23, 1.99, 1.99, 1.99, 91.55, 1.99, 1.99, 1…
$ AMH.ng.mL. <chr> "2.07", "1.53", "6.63", "1.22", "2.26", "6.74", "3.05", "1.54", "1", "1.61", "4.47", "1.67", "7.94", "2.38", "0.88", "0.69", "3…
Rows: 541
Columns: 45
$ Sl..No <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, …
$ Patient.File.No. <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, …
$ PCOS..Y.N. <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Age..yrs. <int> 28, 36, 33, 37, 25, 36, 34, 33, 32, 36, 20, 26, 25, 38, 34, 38, 29, 36, 31, 30, 25, 38, 34, 28, 34, 41, 30, 20, 25, 28, 32, 34,…
$ Weight..Kg. <dbl> 44.6, 65.0, 68.8, 65.0, 52.0, 74.1, 64.0, 58.5, 40.0, 52.0, 71.0, 49.0, 74.0, 50.0, 57.3, 80.5, 43.0, 69.2, 52.4, 85.0, 64.0, 5…
$ Height.Cm. <dbl> 152.0, 161.5, 165.0, 148.0, 161.0, 165.0, 156.0, 159.0, 158.0, 150.0, 163.0, 160.0, 152.0, 152.0, 162.0, 154.0, 148.0, 160.0, 1…
$ BMI <chr> "19.3", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?",…
$ Blood.Group <int> 15, 15, 11, 13, 11, 15, 11, 13, 11, 15, 15, 13, 17, 13, 13, 13, 13, 13, 17, 16, 11, 15, 15, 13, 11, 12, 15, 17, 15, 13, 17, 11,…
$ Pulse.rate.bpm. <int> 78, 74, 72, 72, 72, 78, 72, 72, 72, 80, 80, 72, 72, 74, 74, 78, 80, 72, 72, 72, 70, 72, 74, 74, 72, 80, 75, 72, 78, 78, 78, 72,…
$ RR..breaths.min. <int> 22, 20, 18, 20, 18, 28, 18, 20, 18, 20, 20, 20, 18, 20, 22, 22, 20, 18, 18, 18, 18, 18, 20, 22, 20, 20, 18, 20, 22, 22, 22, 22,…
$ Hb.g.dl. <dbl> 10.48, 11.70, 11.80, 12.00, 10.00, 11.20, 10.90, 11.00, 11.80, 10.00, 10.00, 9.50, 11.70, 12.10, 11.70, 11.40, 11.10, 10.80, 12…
$ Cycle.R.I. <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2, 2, 4, 4, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4…
$ Cycle.length.days. <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 5, 5, 2, 5, 5, 5, 5, 5, 5, 7, 6, 9, 5, 5, 5, 5, 3, 3, 5, 3, 4, 4, 5, 5, 5, 5, 7, 5, 5, 0, 5, 5, 9…
$ Marraige.Status..Yrs. <dbl> 7.0, 11.0, 10.0, 4.0, 1.0, 8.0, 2.0, 13.0, 8.0, 4.0, 4.0, 3.0, 7.0, 15.0, 9.0, 20.0, 2.0, 7.0, 7.0, 7.0, 6.0, 12.0, 10.0, 5.0, …
$ Pregnant.Y.N. <int> 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0…
$ No..of.aborptions <int> 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ I...beta.HCG.mIU.mL. <dbl> 1.990, 60.800, 494.080, 1.990, 801.450, 237.970, 1.990, 100.510, 1.990, 1.990, 158.510, 1.990, 1214.230, 1.990, 1.990, 1.990, 8…
$ II....beta.HCG.mIU.mL. <chr> "1.99", "1.99", "494.08", "1.99", "801.45", "1.99", "1.99", "100.51", "1.99", "1.99", "158.51", "1.99", "1214.23", "1.99", "1.9…
$ FSH.mIU.mL. <dbl> 7.95, 6.73, 5.54, 8.06, 3.98, 3.24, 2.85, 4.86, 3.76, 2.80, 4.89, 4.09, 2.00, 4.84, 7.45, 9.51, 2.02, 4.86, 6.05, 1.89, 2.82, 3…
$ LH.mIU.mL. <dbl> 3.68, 1.09, 0.88, 2.36, 0.90, 1.07, 0.31, 3.07, 3.02, 1.51, 2.02, 1.47, 1.51, 0.71, 3.71, 2.51, 0.65, 2.96, 1.05, 0.81, 1.30, 2…
$ FSH.LH <chr> "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?…
$ Hip.inch. <int> 36, 38, 40, 42, 37, 44, 39, 44, 39, 40, 39, 39, 45, 39, 38, 44, 36, 39, 37, 44, 39, 36, 36, 37, 38, 39, 45, 40, 42, 40, 34, 40,…
$ Waist.inch. <int> 30, 32, 36, 36, 30, 38, 33, 38, 35, 38, 35, 33, 40, 33, 30, 41, 29, 32, 33, 42, 34, 29, 32, 33, 32, 32, 38, 33, 34, 33, 28, 37,…
$ Waist.Hip.Ratio <chr> "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?", "#NAME?…
$ TSH..mIU.L. <dbl> 0.680, 3.160, 2.540, 16.410, 3.570, 1.600, 1.510, 12.180, 1.510, 6.650, 1.560, 3.980, 6.510, 1.480, 1.510, 1.180, 1.980, 5.000,…
$ AMH.ng.mL. <chr> "2.07", "1.53", "6.63", "1.22", "2.26", "6.74", "3.05", "1.54", "1", "1.61", "4.47", "1.67", "7.94", "2.38", "0.88", "0.69", "3…
$ PRL.ng.mL. <dbl> 45.16, 20.09, 10.52, 36.90, 30.09, 16.18, 26.41, 3.97, 19.00, 11.74, 13.47, 21.10, 22.43, 15.62, 19.60, 92.65, 20.25, 12.52, 12…
$ Vit.D3..ng.mL. <dbl> 17.100, 61.300, 49.700, 33.400, 43.800, 52.400, 42.700, 38.000, 21.800, 27.700, 18.100, 29.180, 31.400, 21.200, 24.900, 9.700, …
$ PRG.ng.mL. <dbl> 0.57, 0.97, 0.36, 0.36, 0.38, 0.30, 0.46, 0.26, 0.30, 0.25, 0.36, 0.25, 0.30, 0.40, 0.26, 0.30, 0.46, 0.25, 0.25, 0.30, 0.40, 0…
$ RBS.mg.dl. <dbl> 92, 92, 84, 76, 84, 76, 93, 91, 116, 125, 108, 100, 125, 91, 116, 116, 91, 100, 127, 100, 91, 84, 116, 92, 100, 92, 100, 92, 10…
$ Weight.gain.Y.N. <int> 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ hair.growth.Y.N. <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Skin.darkening..Y.N. <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Hair.loss.Y.N. <int> 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Pimples.Y.N. <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Fast.food..Y.N. <int> 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ Reg.Exercise.Y.N. <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
$ BP._Systolic..mmHg. <int> 110, 120, 120, 120, 120, 110, 120, 120, 120, 110, 110, 120, 120, 110, 120, 120, 110, 110, 120, 120, 110, 120, 110, 110, 120, 11…
$ BP._Diastolic..mmHg. <int> 80, 70, 80, 70, 80, 70, 80, 80, 80, 80, 80, 80, 80, 70, 80, 80, 70, 80, 80, 80, 80, 80, 70, 80, 70, 70, 80, 80, 80, 80, 80, 80,…
$ Follicle.No...L. <int> 3, 3, 13, 2, 3, 9, 6, 7, 5, 1, 7, 4, 15, 3, 4, 1, 6, 1, 0, 16, 1, 4, 5, 6, 4, 1, 21, 3, 7, 11, 10, 5, 8, 2, 11, 1, 6, 1, 7, 6, …
$ Follicle.No...R. <int> 3, 5, 15, 2, 4, 6, 6, 6, 7, 1, 15, 2, 8, 3, 1, 3, 5, 2, 2, 8, 2, 2, 7, 8, 6, 2, 20, 2, 4, 10, 8, 10, 9, 5, 7, 1, 2, 2, 5, 12, 8…
$ Avg..F.size..L...mm. <dbl> 18.0, 15.0, 18.0, 15.0, 16.0, 16.0, 15.0, 15.0, 17.0, 14.0, 17.0, 18.0, 20.0, 18.0, 19.0, 14.0, 20.0, 20.0, 0.0, 18.0, 18.0, 17…
$ Avg..F.size..R...mm. <dbl> 18.0, 14.0, 20.0, 14.0, 14.0, 20.0, 16.0, 18.0, 17.0, 17.0, 20.0, 19.0, 21.0, 17.0, 21.0, 20.0, 20.0, 18.0, 17.0, 17.0, 19.0, 1…
$ Endometrium..mm. <dbl> 8.50, 3.70, 10.00, 7.50, 7.00, 8.00, 6.80, 7.10, 4.20, 2.50, 6.00, 7.80, 8.00, 5.60, 5.50, 3.90, 5.60, 4.00, 5.60, 11.00, 5.70,…
$ X <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",…
\(~\)
Let’s look at the distribution of our data sets using histograms:
pcos data:
\(~\)
pcos_infertility data:
\(~\)
Warning: NAs introduced by coercionWarning: NAs introduced by coercionWarning: NAs introduced by coercionWarning: NAs introduced by coercionWarning: NAs introduced by coercionWarning: NAs introduced by coercionWarning: NAs introduced by coercion
colnames(pcos)
[1] "Sl..No" "Patient.File.No." "PCOS..Y.N." "I...beta.HCG.mIU.mL." "II....beta.HCG.mIU.mL." "AMH.ng.mL."
colnames(pcos_infertility)
[1] "Sl..No" "Patient.File.No." "PCOS..Y.N." "Age..yrs." "Weight..Kg." "Height.Cm."
[7] "BMI" "Blood.Group" "Pulse.rate.bpm." "RR..breaths.min." "Hb.g.dl." "Cycle.R.I."
[13] "Cycle.length.days." "Marraige.Status..Yrs." "Pregnant.Y.N." "No..of.aborptions" "I...beta.HCG.mIU.mL." "II....beta.HCG.mIU.mL."
[19] "FSH.mIU.mL." "LH.mIU.mL." "FSH.LH" "Hip.inch." "Waist.inch." "Waist.Hip.Ratio"
[25] "TSH..mIU.L." "AMH.ng.mL." "PRL.ng.mL." "Vit.D3..ng.mL." "PRG.ng.mL." "RBS.mg.dl."
[31] "Weight.gain.Y.N." "hair.growth.Y.N." "Skin.darkening..Y.N." "Hair.loss.Y.N." "Pimples.Y.N." "Fast.food..Y.N."
[37] "Reg.Exercise.Y.N." "BP._Systolic..mmHg." "BP._Diastolic..mmHg." "Follicle.No...L." "Follicle.No...R." "Avg..F.size..L...mm."
[43] "Avg..F.size..R...mm." "Endometrium..mm." "X"
As mentioned earlier, my data preparation will mainly consist of
renaming columns, targeting missing values whether it is by replacing
them with a mean, median or mode for Marriage Status (Yrs)
and Fast Food (Y/N) or calculating the values as a whole as
its the case of BMI, FSH.LH and
Waist.Hip.Ratio. I’ll also remove columns that are
duplicate or not need so that it’s easier to manage when I merge my two
data sets.
\(~\)
Here’s the results after part 1 of the preparation process:
# merge data sets
#pcos_data <- merge(pcos, pcos_infertility, by= "PCOS(Y/N)")
pcos_data <- merge(pcos, pcos_infertility, by=c("Sl.No"))
#pcos_data <- pcos_data[,-6]
head(pcos_data)
\(~\)
Checking for missing data:
Sl.No PCOS(Y/N).x I beta-HCG(mIU/mL) II beta-HCG(mIU/mL) AMH(ng/mL) PCOS(Y/N).y Age(Yrs)
0 0 0 0 1 0 0
Weight(Kg) Height(Cm) BMI Blood Group Pulse rate(bpm) RR(breaths/min) Hb(g/dl)
0 0 299 0 0 0 0
Cycle(R/I) Cycle length(days) Marriage Status(Yrs) Pregnant(Y/N) No. of aborptions FSH(mIU/mL) LH(mIU/mL)
0 0 1 0 0 0 0
FSH/LH Hip(inch) Waist(inch) Waist-Hip Ratio TSH(mIU/L) PRL(ng/mL) Vit D3(ng/mL)
532 0 0 532 0 0 0
PRG(ng/mL) RBS(mg/dl) Weight gain(Y/N) hair growth(Y/N) Skin darkening(Y/N) Hair loss(Y/N) Pimples(Y/N)
0 0 0 0 0 0 0
Fast food(Y/N) Reg.Exercise(Y/N) BP Systolic(mmHg) BP Diastolic(mmHg) Follicle No.(L) Follicle No.(R) Avg. F size(L)(mm)
1 0 0 0 0 0 0
Avg. F size(R)(mm) Endometrium(mm)
0 0
\(~\)
For part 2, I tackled the missing values by first transforming
Height from cm to m, calculated BMI,
Waist-hip ratio and FSH/LH. Then after careful
consideration to the data, I decided to use the median number to replace
the missing values in Marriage Status (Yrs) and
Fast food (Y/N) since it didn’t disrupt the data’s
distribution.
\(~\)
After tidying up the data, below is the final distribution:
colnames(pcos_data)
[1] "Sl.No" "PCOS(Y/N).x" "I beta-HCG(mIU/mL)" "II beta-HCG(mIU/mL)" "AMH(ng/mL)" "PCOS(Y/N).y"
[7] "Age(Yrs)" "Weight(Kg)" "Height(M)" "BMI" "Blood Group" "Pulse rate(bpm)"
[13] "RR(breaths/min)" "Hb(g/dl)" "Cycle(R/I)" "Cycle length(days)" "Marriage Status(Yrs)" "Pregnant(Y/N)"
[19] "No. of aborptions" "FSH(mIU/mL)" "LH(mIU/mL)" "FSH/LH" "Hip(inch)" "Waist(inch)"
[25] "Waist-Hip Ratio" "TSH(mIU/L)" "PRL(ng/mL)" "Vit D3(ng/mL)" "PRG(ng/mL)" "RBS(mg/dl)"
[31] "Weight gain(Y/N)" "hair growth(Y/N)" "Skin darkening(Y/N)" "Hair loss(Y/N)" "Pimples(Y/N)" "Fast food(Y/N)"
[37] "Reg.Exercise(Y/N)" "BP Systolic(mmHg)" "BP Diastolic(mmHg)" "Follicle No.(L)" "Follicle No.(R)" "Avg. F size(L)(mm)"
[43] "Avg. F size(R)(mm)" "Endometrium(mm)"
str(pcos_data)
'data.frame': 541 obs. of 44 variables:
$ Sl.No : num 1 2 3 4 5 6 7 8 9 10 ...
$ PCOS(Y/N).x : num 0 0 1 0 0 0 0 0 0 0 ...
$ I beta-HCG(mIU/mL) : num 1.99 60.8 494.08 1.99 801.45 ...
$ II beta-HCG(mIU/mL) : num 1.99 1.99 494.08 1.99 801.45 ...
$ AMH(ng/mL) : num 2.07 1.53 6.63 1.22 2.26 6.74 3.05 1.54 1 1.61 ...
$ PCOS(Y/N).y : num 0 0 1 0 0 0 0 0 0 0 ...
$ Age(Yrs) : num 28 36 33 37 25 36 34 33 32 36 ...
$ Weight(Kg) : num 44.6 65 68.8 65 52 74.1 64 58.5 40 52 ...
$ Height(M) : num 1.5 1.6 1.7 1.5 1.6 1.7 1.6 1.6 1.6 1.5 ...
$ BMI : num 19.8 25.4 23.8 28.9 20.3 25.6 25 22.9 15.6 23.1 ...
$ Blood Group : num 15 15 11 13 11 15 11 13 11 15 ...
$ Pulse rate(bpm) : num 78 74 72 72 72 78 72 72 72 80 ...
$ RR(breaths/min) : num 22 20 18 20 18 28 18 20 18 20 ...
$ Hb(g/dl) : num 10.5 11.7 11.8 12 10 ...
$ Cycle(R/I) : num 2 2 2 2 2 2 2 2 2 4 ...
$ Cycle length(days) : num 5 5 5 5 5 5 5 5 5 2 ...
$ Marriage Status(Yrs): num 7 11 10 4 1 8 2 13 8 4 ...
$ Pregnant(Y/N) : num 0 1 1 0 1 1 0 1 0 0 ...
$ No. of aborptions : num 0 0 0 0 0 0 0 2 1 0 ...
$ FSH(mIU/mL) : num 7.95 6.73 5.54 8.06 3.98 3.24 2.85 4.86 3.76 2.8 ...
$ LH(mIU/mL) : num 3.68 1.09 0.88 2.36 0.9 1.07 0.31 3.07 3.02 1.51 ...
$ FSH/LH : num 2.16 6.17 6.3 3.42 4.42 3.03 9.19 1.58 1.25 1.85 ...
$ Hip(inch) : num 36 38 40 42 37 44 39 44 39 40 ...
$ Waist(inch) : num 30 32 36 36 30 38 33 38 35 38 ...
$ Waist-Hip Ratio : num 0.83 0.84 0.9 0.86 0.81 0.86 0.85 0.86 0.9 0.95 ...
$ TSH(mIU/L) : num 0.68 3.16 2.54 16.41 3.57 ...
$ PRL(ng/mL) : num 45.2 20.1 10.5 36.9 30.1 ...
$ Vit D3(ng/mL) : num 17.1 61.3 49.7 33.4 43.8 52.4 42.7 38 21.8 27.7 ...
$ PRG(ng/mL) : num 0.57 0.97 0.36 0.36 0.38 0.3 0.46 0.26 0.3 0.25 ...
$ RBS(mg/dl) : num 92 92 84 76 84 76 93 91 116 125 ...
$ Weight gain(Y/N) : num 0 0 0 0 0 1 0 1 0 0 ...
$ hair growth(Y/N) : num 0 0 0 0 0 0 0 0 0 0 ...
$ Skin darkening(Y/N) : num 0 0 0 0 0 0 0 0 0 0 ...
$ Hair loss(Y/N) : num 0 0 1 0 1 1 0 0 0 0 ...
$ Pimples(Y/N) : num 0 0 1 0 0 0 0 0 0 0 ...
$ Fast food(Y/N) : num 1 0 1 0 0 0 0 0 0 0 ...
$ Reg.Exercise(Y/N) : num 0 0 0 0 0 0 0 0 0 0 ...
$ BP Systolic(mmHg) : num 110 120 120 120 120 110 120 120 120 110 ...
$ BP Diastolic(mmHg) : num 80 70 80 70 80 70 80 80 80 80 ...
$ Follicle No.(L) : num 3 3 13 2 3 9 6 7 5 1 ...
$ Follicle No.(R) : num 3 5 15 2 4 6 6 6 7 1 ...
$ Avg. F size(L)(mm) : num 18 15 18 15 16 16 15 15 17 14 ...
$ Avg. F size(R)(mm) : num 18 14 20 14 14 20 16 18 17 17 ...
$ Endometrium(mm) : num 8.5 3.7 10 7.5 7 8 6.8 7.1 4.2 2.5 ...
#pcos_data$`AMH(ng/mL)` <- as.numeric(pcos_data$`AMH(ng/mL)`)
#str(pcos_data)
\(~\)
start of plotly graphs:
plot(x=pcos_data$'Age(Yrs)', y=pcos_data$'Weight(Kg)')
plot_ly(data = pcos_data, x = ~'Age(Yrs)', y = ~'Weight(Kg)')
No trace type specified:
Based on info supplied, a 'histogram2d' trace seems appropriate.
Read more about this trace type -> https://plotly.com/r/reference/#histogram2d
No trace type specified:
Based on info supplied, a 'histogram2d' trace seems appropriate.
Read more about this trace type -> https://plotly.com/r/reference/#histogram2d
ggplot(pcos_data, aes(x='Age(Yrs)', y='Weight(Kg)')) +
geom_point() +
theme_ipsum() +
theme(
plot.title = element_text(size=10)
)
ggplot(pcos_data, aes(x=pcos_data$"Hip(inch)", y=pcos_data$"Waist(inch)")) +
geom_point() +
theme_ipsum() +
theme(
plot.title = element_text(size=10)
)
# fig <- pcos_data %>%
# plot_ly() %>%
# add_trace(x = ~x, y = ~y, type = 'bar',
# text = y, textposition = 'auto',
# marker = list(color = 'rgb(158,202,225)',
# line = list(color = 'rgb(8,48,107)', width = 1.5))) %>%
# add_trace(x = ~x, y = ~y2, type = 'bar',
# text = y2, textposition = 'auto',
# marker = list(color = 'rgb(58,200,225)',
# line = list(color = 'rgb(8,48,107)', width = 1.5))) %>%
# layout(title = "January 2013 Sales Report",
# barmode = 'group',
# xaxis = list(title = ""),
# yaxis = list(title = ""))
#
# fig
\(~\)
Kottarathil, P. (2020, October 11). Polycystic ovary syndrome (PCOS). Kaggle. Retrieved October 9, 2022, from https://www.kaggle.com/datasets/prasoonkottarathil/polycystic-ovary-syndrome-pcos
Stewart, M. M., & Foster, S. (2012). PCOS awareness association. PCOS Awareness Association. Retrieved October 9, 2022, from https://www.pcosaa.org/
Bartlett, E., & Erlich, L. (2015). Feed your fertility: Your guide to cultivating a healthy pregnancy with traditional Chinese medicine, real food, and holistic living. Fair Winds Press.